package com.cssw.fyzb.web.controller;

import com.cssw.fyzb.base.web.domain.AjaxPage;
import com.cssw.fyzb.web.service.ResourcesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @description:
 * @author: zzf
 * @time: 2020/12/23 16:53
 */
@Api(description = "共用相关的接口")
@RestController
@RequestMapping("/resour")
public class ResourcesController {

    @Autowired
    private ResourcesService resourcesService;

    @ApiOperation(value = "图片上传")
    @RequestMapping(value = "/imgFile", method = RequestMethod.POST)
    public AjaxPage imgFile(@RequestParam MultipartFile[] files) throws Exception {
        return resourcesService.imgFile(files);
    }
}
